<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 

<!--modal fade bs-example-modal-lg 弹出框 高级查询-->
<div class="modal fade bs-example-modal-lg advancedFilterPopup" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
	<div class="modal-dialog modal-lg xxh_moudle_popup" role="document">
		<div class="modal-content">
			<!-- 头 -->
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="myModalLabel">高级查询</h4>
			</div>
			
			<!-- 身 -->
			<div class="modal-body">
				<!-- 输入框 -->
				<c:forEach items="${advancedFindFilterInfos}" var="filterInfo" >
					<div class="panel panel-default">
						<div class="panel-body">
							<div class="xxh_module_addMessage" style="overflow: visible;">
								<c:forEach items="${filterInfo.values}" var="value">
								<!-- 输入框 -->
								<c:if test="${value.type=='General'}">
									<div class="col-md-2 xxh_textInput">
										<label>${value.comment}:</label>
										<input name="${value.name}" class="form-control" type="text" placeholder="输入${value.comment}" />
									</div>
								</c:if>
								<!-- 列表 -->
								<c:if test="${value.type=='List'}">
			                        <div class="col-md-2 xxh_select" >
			                             <label>${value.comment}:</label>
			                             <input class="form-control" type="text" placeholder="--全部--"
			                              onkeyup="js_listReFilter_onkeyup_input(this)" onfocus="js_listReFilter_onfocus(this)" onblur="js_listReFilter_onblur_input(this)"
			                             />
			                             <select style="display: none;" name="${value.name}" class="form-control">
			                             	<option class="js_option_default" style="display: none;" value="" ignoreBlank="true" >--全部--</option>
								            <c:forEach items="${moduleBody.relations[value.name]}" var="item">
								            	<option onclick="js_listReFilter_click_option(this)" value="${item.id}" >${item}</option>
								            </c:forEach>
			                             </select>
			                        </div>
								</c:if>
								<!-- 枚举 -->
								<c:if test="${value.type=='Enum'}">
			                        <div class="col-md-2 xxh_select">
			                             <label>${value.comment}:</label>
			                             <select name="${value.name}" class="form-control">
			                             	<option value="" ignoreBlank="true" >--全部--</option>
								            <c:forEach items="${value.content}" var="item">
								            <option <c:if test="${value.defaultValue==item}">selected="selected"</c:if> value="${item}">${item.comment}</option>
								            </c:forEach>
			                             </select>
			                        </div>
								</c:if>
								<!-- 布尔 -->
								<c:if test="${value.type=='Boolean'}">
			                        <div class="col-md-2 xxh_select">
			                             <label>${value.comment}:</label>
			                             <select name="${value.name}" class="form-control">
			                             	<option value="" ignoreBlank="true" >--全部--</option>
								            <option <c:if test="${value.defaultValue==true}">selected="selected"</c:if> value="true">是</option>
								            <option <c:if test="${value.defaultValue==false}">selected="selected"</c:if> value="false">否</option>
			                             </select>
			                        </div>
								</c:if>
								<!-- 日期 -->
								<c:if test="${value.type=='Date'}">
									<div class="col-md-4">
						              	<div class="xxh_moudle_date">
						              		<div class="xxh_t pull-left"><span>按${value.comment}查询：</span></div>
						              		<c:if test="${value.condition=='Between'}" var="betweenFlag">
						                  		<div class="xxh_date pull-left"><input name="${value.name}${value.startSuffix}" class="form-control" type="date"/></div>
						                   		<span class="pull-left" style="margin:0 5px;">至</span>
						                    	<div class="xxh_date pull-left"><input name="${value.name}${value.endSuffix}" class="form-control" type="date"/></div>
											</c:if>
											<c:if test="${!betweenFlag}">
												<div class="xxh_date pull-left"><input name="${value.name}" class="form-control" type="date"/></div>
											</c:if>
										</div>
									</div>
								</c:if>
								</c:forEach>
							</div>
						</div>
					</div>
				</c:forEach>
			</div>
		    <!-- 按钮 -->
		    <div class="modal-footer">
		      <button type="button" class="btn btn-default" data-dismiss="modal" >关闭</button>
		      <button type="reset" class="btn btn-default" >清空条件</button>
		      <button type="button" class="btn btn-primary js_filterButtonClick" data-dismiss="modal" onclick="advancedFilterSubmit(this)">提交查询</button>
		    </div>
        </div>
	</div>
</div>
<!--modal fade bs-example-modal-lg 弹出框 带有查询列表-->   
    